package com.xuecheng.teaching.agent;

import com.xuecheng.api.learning.model.dto.UserDTO;
import com.xuecheng.common.constant.XcFeignServiceNameList;
import com.xuecheng.common.domain.response.RestResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 *  Feign远程调用 教学机构管理
 */
@FeignClient(value = XcFeignServiceNameList.XC_LEARNING_SERVICE)
public  interface LearningApiAgent {

    String SERVICE_CONTEXT_PRE = "/learning";

    /**
     * 根据租户Id获取机构信息（机构时一种租户）
     * @param userName
     * @return
     */
    @GetMapping(SERVICE_CONTEXT_PRE + "/l/user/{userName}")
    RestResponse<UserDTO> getUserByUserName(@PathVariable(value = "userName") String userName);

}

